var FormAction = Base.extend(
{
    _selectedLink: null,
    _displayedTab: null,

    constructor: function()
    {
        $('.term_number').bind('click', handler(this, '_onTabClick'));

        this._init( $('#term1') );

        this._show();
    },

    _onTabClick: function(evt)
    {
        var tabLink = $(evt.currentTarget);
        this._hide();
        this._init( tabLink );
        this._show();
    },

    _init: function( selected )
    {
        this._selectedLink = selected;
        this._setDisplayedTab();
    },

    _setDisplayedTab: function()
    {
        var tabLinkId = this._selectedLink.attr('id');
        this._displayedTab = $('#' + tabLinkId + 'Content');
    },

    _hide: function()
    {
        this._selectedLink.removeClass("selected");
        this._displayedTab.removeClass("display");
        this._displayedTab.addClass("not_display");
    },

    _show: function()
    {
        this._selectedLink.addClass("selected");
        this._displayedTab.removeClass("not_display");
        this._displayedTab.addClass("display");
    }
});